package summerbug.hanzi;

import android.support.annotation.NonNull;
import android.support.design.widget.NavigationView;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.Button;

import java.util.ArrayList;
import java.util.List;

import summerbug.hanzi.adapter.HomeAdapter;
import summerbug.hanzi.base.BaseActivity;

public class MainActivity extends BaseActivity {
    RecyclerView recyclerView;
    List<String> data;

    @Override
    protected int getLayout() {
        return R.layout.activity_main;
    }


    protected void initView() {
        recyclerView = findViewById(R.id.rv_main);

        data = new ArrayList<>();
        LinearLayoutManager manager = new LinearLayoutManager(this,LinearLayoutManager.VERTICAL,false);
        HomeAdapter homeAdapter = new HomeAdapter(R.layout.rv_main,data);
        data.add("1");
        data.add("1");
        data.add("1");
        recyclerView.setLayoutManager(manager);
        recyclerView.setAdapter(homeAdapter);
    }

}
